using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools._Administration
{
    /// <summary>
    /// <para>Import Associations</para>
    /// <para>Imports associations from a comma-separated values file (.csv) into an existing utility network. This tool can be used in conjunction with the Export Associations tool.</para>
    /// <para>将逗号分隔值文件 （.csv） 中的关联导入到现有公共设施网络中。此工具可与导出关联工具结合使用。</para>
    /// </summary>    
    [DisplayName("Import Associations")]
    public class ImportAssociations : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ImportAssociations()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Utility Network</para>
        /// <para>The utility network to which the associations will be imported.</para>
        /// <para>将关联导入到的公共设施网络。</para>
        /// </param>
        /// <param name="_association_type">
        /// <para>Association Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of association that will be imported.</para>
        ///   <bulletList>
        ///     <bullet_item>All—All association types will be imported.</bullet_item><para/>
        ///     <bullet_item>Junction-junction connectivity—The junction-junction connectivity association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Containment—The containment association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Attachment—The structural attachment association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (from side of edge)—The junction-edge connectivity (from side of edge) association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (midspan)—The junction-edge connectivity (midspan) association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (to side of edge)—The junction-edge connectivity (to side of edge) association type will be imported.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将导入的关联类型。</para>
        ///   <bulletList>
        ///     <bullet_item>全部—将导入所有关联类型。</bullet_item><para/>
        ///     <bullet_item>交汇点-交汇点连通性—将导入交汇点-交汇点连通性关联类型。</bullet_item><para/>
        ///     <bullet_item>包含 - 将导入包含关联类型。</bullet_item><para/>
        ///     <bullet_item>附件 - 将输入结构附件关联类型。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（从边的一侧）—将输入交汇点-边连通性（从边的一侧）关联类型。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（跨度）—将输入交汇点-边连接（跨度）关联类型。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（到边的一侧）—将输入交汇点-边的连通性（到边的一侧）关联类型。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_csv_file">
        /// <para>Input File</para>
        /// <para>The .csv file from which the associations will be imported.</para>
        /// <para>将从中导入关联的.csv文件。</para>
        /// </param>
        public ImportAssociations(object _in_utility_network, _association_type_value? _association_type, object _csv_file)
        {
            this._in_utility_network = _in_utility_network;
            this._association_type = _association_type;
            this._csv_file = _csv_file;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Import Associations";

        public override string CallName => "un.ImportAssociations";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_utility_network, _association_type.GetGPValue(), _csv_file, _out_utility_network];

        /// <summary>
        /// <para>Input Utility Network</para>
        /// <para>The utility network to which the associations will be imported.</para>
        /// <para>将关联导入到的公共设施网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Association Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of association that will be imported.</para>
        ///   <bulletList>
        ///     <bullet_item>All—All association types will be imported.</bullet_item><para/>
        ///     <bullet_item>Junction-junction connectivity—The junction-junction connectivity association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Containment—The containment association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Attachment—The structural attachment association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (from side of edge)—The junction-edge connectivity (from side of edge) association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (midspan)—The junction-edge connectivity (midspan) association type will be imported.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (to side of edge)—The junction-edge connectivity (to side of edge) association type will be imported.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将导入的关联类型。</para>
        ///   <bulletList>
        ///     <bullet_item>全部—将导入所有关联类型。</bullet_item><para/>
        ///     <bullet_item>交汇点-交汇点连通性—将导入交汇点-交汇点连通性关联类型。</bullet_item><para/>
        ///     <bullet_item>包含 - 将导入包含关联类型。</bullet_item><para/>
        ///     <bullet_item>附件 - 将输入结构附件关联类型。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（从边的一侧）—将输入交汇点-边连通性（从边的一侧）关联类型。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（跨度）—将输入交汇点-边连接（跨度）关联类型。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（到边的一侧）—将输入交汇点-边的连通性（到边的一侧）关联类型。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Association Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _association_type_value? _association_type { get; set; }

        public enum _association_type_value
        {
            /// <summary>
            /// <para>All</para>
            /// <para>All—All association types will be imported.</para>
            /// <para>全部—将导入所有关联类型。</para>
            /// </summary>
            [Description("All")]
            [GPEnumValue("ALL")]
            _ALL,

            /// <summary>
            /// <para>Junction-junction connectivity</para>
            /// <para>Junction-junction connectivity—The junction-junction connectivity association type will be imported.</para>
            /// <para>交汇点-交汇点连通性—将导入交汇点-交汇点连通性关联类型。</para>
            /// </summary>
            [Description("Junction-junction connectivity")]
            [GPEnumValue("JUNCTION_JUNCTION_CONNECTIVITY")]
            _JUNCTION_JUNCTION_CONNECTIVITY,

            /// <summary>
            /// <para>Containment</para>
            /// <para>Containment—The containment association type will be imported.</para>
            /// <para>包含 - 将导入包含关联类型。</para>
            /// </summary>
            [Description("Containment")]
            [GPEnumValue("CONTAINMENT")]
            _CONTAINMENT,

            /// <summary>
            /// <para>Attachment</para>
            /// <para>Attachment—The structural attachment association type will be imported.</para>
            /// <para>附件 - 将输入结构附件关联类型。</para>
            /// </summary>
            [Description("Attachment")]
            [GPEnumValue("STRUCTURAL_ATTACHMENT")]
            _STRUCTURAL_ATTACHMENT,

            /// <summary>
            /// <para>Junction-edge connectivity (from side of edge)</para>
            /// <para>Junction-edge connectivity (from side of edge)—The junction-edge connectivity (from side of edge) association type will be imported.</para>
            /// <para>交汇点-边连通性（从边的一侧）—将输入交汇点-边连通性（从边的一侧）关联类型。</para>
            /// </summary>
            [Description("Junction-edge connectivity (from side of edge)")]
            [GPEnumValue("JUNCTION_EDGE_FROM_CONNECTIVITY")]
            _JUNCTION_EDGE_FROM_CONNECTIVITY,

            /// <summary>
            /// <para>Junction-edge connectivity (midspan)</para>
            /// <para>Junction-edge connectivity (midspan)—The junction-edge connectivity (midspan) association type will be imported.</para>
            /// <para>交汇点-边连通性（跨度）—将输入交汇点-边连接（跨度）关联类型。</para>
            /// </summary>
            [Description("Junction-edge connectivity (midspan)")]
            [GPEnumValue("JUNCTION_EDGE_MIDSPAN_CONNECTIVITY")]
            _JUNCTION_EDGE_MIDSPAN_CONNECTIVITY,

            /// <summary>
            /// <para>Junction-edge connectivity (to side of edge)</para>
            /// <para>Junction-edge connectivity (to side of edge)—The junction-edge connectivity (to side of edge) association type will be imported.</para>
            /// <para>交汇点-边连通性（到边的一侧）—将输入交汇点-边的连通性（到边的一侧）关联类型。</para>
            /// </summary>
            [Description("Junction-edge connectivity (to side of edge)")]
            [GPEnumValue("JUNCTION_EDGE_TO_CONNECTIVITY")]
            _JUNCTION_EDGE_TO_CONNECTIVITY,

        }

        /// <summary>
        /// <para>Input File</para>
        /// <para>The .csv file from which the associations will be imported.</para>
        /// <para>将从中导入关联的.csv文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _csv_file { get; set; }


        /// <summary>
        /// <para>Updated Utility Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        public ImportAssociations SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}